package com.xjoyt.pay.share.po;

import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.GenericGenerator;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.xjoyt.pay.constants.DateConstant;

@Entity
@Table(name = "t_sms")
public class Sms {

	@Id
	@GeneratedValue(generator = "uuid")
	@GenericGenerator(name = "uuid", strategy = "uuid2")
	@Column(name = "sms_id", length = 36)
	public String id;

	/**
	 * 手机号
	 */
	@Column(name = "phone", length = 50)
	public String phone;

	/**
	 * 发送内容
	 */
	@Column(name = "content", length = 50)
	public String content;

	/**
	 * 公司
	 */
	@Column(name = "company_id", length = 36)
	public String companyId;

	/**
	 * 公司名称
	 */
	@Column(name = "company_name", length = 50)
	public String companyName;

	/**
	 * 签名
	 */
	@Column(name = "sign", length = 50)
	public String sign;

	/**
	 * 是否成功
	 */
	@org.hibernate.annotations.Type(type = "yes_no")
	@Column(name = "is_success")
	public Boolean success;

	/**
	 * 时间
	 */
	@Temporal(TemporalType.TIMESTAMP)
	@Column(name = "added_date")
	@JsonFormat(pattern = DateConstant.DATE_TIME_FORMAT_PATTERN, timezone = "GMT+8")
	public Date addedDate;

}
